package controller;

import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import beans.*;


public class prueba {

	public static void main(String[] args) {
		//Sistema s = Sistema.getInstancia();
		
		  String digit = "d";
		    String point = ".";
		    String regex1 = "\\d+\\.\\d+";
		    String regex2 = Pattern.quote(digit + "+" + point + digit + "+");

		    Pattern numbers1 = Pattern.compile(regex1);
		    Pattern numbers2 = Pattern.compile(regex2);

		    System.out.println("Regex 1: " + regex1);

		    if (numbers1.matcher("1.2").matches())
		    {
		        System.out.println("\tMatch");
		    }
		    else
		    {
		        System.out.println("\tNo match");
		    }

		    System.out.println("Regex 2: " + regex2);

		    if (numbers2.matcher("1.2").matches())
		    {
		        System.out.println("\tMatch");
		    }
		    else
		    {
		        System.out.println("\tNo match");
		    }
		
	}
}



